# encoding: utf-8
import os
import pymysql
HOSTNAME = '127.0.0.1'
PORT     = '3306'
DATABASE = 'flask'
USERNAME = 'root'
PASSWORD = ''

# 打开数据库连接
db = pymysql.connect(host=HOSTNAME,
                     user=USERNAME,
                     password=PASSWORD,
                     database=DATABASE)